﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Manual.aspx.cs" Inherits="InstanceConfigurer.Manual" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
	<style type="text/css">
		.style1
		{
			width: 70%;
		}
		.style2
		{
			width: 20%;
			text-align: right;
		}
		.style3
		{
			width: 100%;
		}
		</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1">
		<tr>
			<td colspan="2">
				<asp:Label ID="LabelPartitionKey" runat="server" Text="PartitionKey" Font-Size="Small"></asp:Label>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<asp:Label ID="LabelRowKey" runat="server" Text="RowKey" Font-Size="Small"></asp:Label>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<asp:Label ID="LabelRoleName" runat="server" Text="RoleName" Font-Size="Small"></asp:Label>
			</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label1" runat="server" Text="Maunual/Auto Mode"></asp:Label>
			</td>
			<td>
				<asp:RadioButton ID="RadioButtonMode1" runat="server" Checked="True" 
					GroupName="mode" Text="Auto" />
				<asp:RadioButton ID="RadioButtonMode2" runat="server" GroupName="mode" 
					Text="Manual" />
			</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label2" runat="server" Text="Manual Instance Count"></asp:Label>
			</td>
			<td>
				<asp:TextBox ID="TextBoxManualInstanceCount" runat="server" Width="50px"></asp:TextBox>
			</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label8" runat="server" Text="Commands"></asp:Label>
			</td>
			<td>
				<asp:Button ID="ButtonUpdate" runat="server" Text="Set Mode" 
					onclick="ButtonUpdate_Click" />
			&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2"><br /><br /></td>
		</tr>
		<tr>
			<td colspan="2" class="style3">
				Processor Utilization is sampled to help determine the point to 
				increase or decrease instances.<br />
						Set the sample intervals to influence the Instance Controller.&nbsp;
						<br />
						Rules:
						<ul>
							<li>
						Long interval should be 2 or more hours (in minutes) to set a floor of 
						operation.</li>
							<li>
								Short interval should be 45 to 90 minutes as Azure charges in 1 hour increments.</li>
							<li>
								Fast Attack should be in the range of 15 minumum to 30 minutes</li>
				</ul>
			</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label3" runat="server" Text="Long Interval"></asp:Label>
			</td>
			<td>
				<asp:TextBox ID="TextBoxLongInterval" runat="server" Width="50px">120</asp:TextBox>
			&nbsp;(minutes) recommend 120 or higher</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label4" runat="server" Text="Short Interval"></asp:Label>
			</td>
			<td>
				<asp:TextBox ID="TextBoxShortInterval" runat="server" Width="50px">45</asp:TextBox>
			&nbsp;(minutes) recommend ~60
			</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label5" runat="server" Text="Fast Attack Interval"></asp:Label>
			</td>
			<td>
				<asp:TextBox ID="TextBoxFastAttack" runat="server" Width="50px">15</asp:TextBox>
			&nbsp;(minutes) recommend 15-30</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label7" runat="server" Text="Spin-Up delay"></asp:Label>
			</td>
			<td>
				<asp:TextBox ID="TextBoxSpinUpDelay" runat="server" Width="50px">15</asp:TextBox>
			&nbsp;(minutes) recommend 10-30</td>
		</tr>
		<tr>
			<td class="style2">
				<asp:Label ID="Label6" runat="server" Text="Set Intervals"></asp:Label>
			</td>
			<td>
				<asp:Button ID="ButtonSetIntervals" runat="server" Text="Set Intervals" 
					onclick="ButtonSetIntervals_Click" />
			&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2"><br /><br /></td>
		</tr>
		<tr>
			<td>			&nbsp;
			</td>
			<td>
				&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2">
				<asp:Label ID="LabelError" runat="server" Text="" Font-Size="Small" ForeColor="#990000"></asp:Label>
			</td>
		</tr>
	</table>
</asp:Content>
